import { HttpClient } from "@angular/common/http";
import { Component, OnInit } from "@angular/core";
import { NavController } from "@ionic/angular";

@Component({
  selector: "app-history",
  templateUrl: "./history.page.html",
  styleUrls: ["./history.page.scss"],
})
export class HistoryPage implements OnInit {
  constructor(public router: NavController, public http: HttpClient) {}
  res: Result;
  ngOnInit() {
    let url = "http://xiaoshuogebed.applinzi.com/sec_history";
    this.http.get(url).subscribe((res: Result) => {
      this.res = res;
    });
  }
}
interface Result {
  code: number;
  message: string;
  results: result[];
}

interface result {
  author: string;
  bid: number;
  cover: string;
  majorCate: string;
  minorCate: string;
  shortIntro: string;
  title: string;
}
